import Qt 4.7
import "../colibri"

Item {
    width: screenWidth
    height: screenHeight

    // date select props
    property alias selectedDate: dateSelector.selectedDate
    property alias selectedMonth: dateSelector.selectedMonth
    property alias selectedYear: dateSelector.selectedYear

    // time distance props
    property alias selectedHours: timeDistanceSelector.hours
    property alias selectedMinutes: timeDistanceSelector.minutes
    property alias selectedDistance: timeDistanceSelector.distance

    // mood props
    property alias selectedMood: moodSelector.mood
    property alias selectedComment: moodSelector.comment

    // sports props
    property alias selectedName: sportSelector.selectedName
    property alias selectedId: sportSelector.selectedId

    // error props
    property alias errorText: errorNote.text
    property bool errorVisible: false

    // info props
    property alias infoText: infoNote.text
    property bool infoVisible: false

    Note {
        id: errorNote
        anchors.fill:  parent
        visible: errorVisible
        color: "red"
    }

    Note {
        id: infoNote
        anchors.fill:  parent
        visible: infoVisible
        color: "green"
    }

    // Favorites on top
    SportSelector {
        id: sportSelector
        anchors {
            top: parent.top
            left: parent.left
            right: parent.right
        }
        height: 120
    }

    // Then date selector under sport selector
    DateSelector {
        id: dateSelector
        anchors {
            top: sportSelector.bottom
            left: parent.left
            right: parent.right
        }
        height: 80
    }

    TimeDistanceSelector {
        id: timeDistanceSelector
        anchors {
            top: dateSelector.bottom
            left: parent.left
            right: parent.right
        }
        height: 100
    }

    MoodSelector {
        id: moodSelector
        anchors {
            top: timeDistanceSelector.bottom
            bottom: postLog.top
            left: parent.left
            right: parent.right
        }
    }

    PostLog{
        id: postLog
        height: 150
        anchors {
            left: parent.left
            right: parent.right
            bottom: parent.bottom
        }
    }
}
